Imports Clo = Enhancements.Core.Logging
Imports Ref = System.Reflection
Imports Sys = System

Namespace Enhancements.Basic.Expressions.Functions
    ''' <summary>The exception that is thrown when a name for use in a function signature parameter is not valid.</summary>
    ''' <remarks>The InnerException property holds the exception that leads to the throwing of these exceptions.</remarks>
    <Serializable(), DebuggerStepThrough()> _
    Public NotInheritable Class FunctionSignatureParameterNameIsValidNotException
        Inherits Exception

        Private Sub New(ByVal _name As System.String, ByVal _innerException As Sys.Exception)
            MyBase.New(_innerException)
            Name = _name
        End Sub

        Private __Name As System.String = Nothing
        ''' <summary>Gets the name that caused this exception.</summary>
        Public Property Name() As System.String
            Get
                Return __Name
            End Get
            Private Set(ByVal _value As System.String)
                __Name = _value
            End Set
        End Property

        ''' <summary>Throws an exception.</summary>
        ''' <param name="_name">Name that is causing the exception.</param>
        ''' <param name="_innerException">Exception that led to the throwing of this exception.</param>
        ''' <exception cref="FunctionSignatureParameterNameIsValidNotException"> </exception>
        Friend Shared Sub ___Throw(ByVal _name As System.String, ByVal _innerException As Sys.Exception)
            Dim _exception As FunctionSignatureParameterNameIsValidNotException = New FunctionSignatureParameterNameIsValidNotException(_name, _innerException)

            Throw _exception
        End Sub

    End Class
End Namespace
